<template>
  <van-empty v-if="teamList.length === 0">队伍列表为空！</van-empty>
  <CardTeamList :teamList="teamList" :showDissolutionTeamBtn="true"></CardTeamList>
</template>

<script setup lang="ts">
import CardTeamList from "../../components/CardTeamList.vue";
import {onMounted, ref} from "vue";
import request from "../../request/request";
import {showFailToast} from "vant";

const teamList = ref([]);

// 页面加载时挂载
onMounted(async () => {
  const res = await request.get('/team/my/create')
  if (res.data.code === 200 && res.data.data) {
    teamList.value = res.data.data;
  } else {
    showFailToast(res.data.message);
  }
})

</script>
<style scoped>

</style>